from typing import List
from sqlalchemy.orm import Session

from base_db.crud.base import CRUDBase
from base_db.atcdbModel import TabFpl
from base_db.schemas.BaseARO import BaseARO


class CRUDFpl(CRUDBase[TabFpl, BaseARO, BaseARO]):
    def get_plan_by_flight(self, db: Session, flight: str) -> List[BaseARO]:
        """

        @param flight:
        @param db:
        @return:
        """
        flights = db.query(TabFpl).get(TabFpl.flight == flight).all()
        return flights
